from card import *

class Deck:
    """牌堆 - 开始游戏后 每一轮都各给一个玩家发一张牌"""
    cards = []

    def __init__(self):
        for i in range(0,4):
            for j in range(0,13):
                self.cards.append(Card(j, i))
        shuffle(self.cards)

    def fetch(self):
        """
        return top card
        if deck size is zero
        ...return None
        """
        if len(self.cards) == 0:
            return
        return self.cards.pop()

# deck = Deck()
# print(deck.cards)